<template>
  <div style="margin-top:-18px">
    <a-card>
      <!-- //页面总报表 -->
      <div style="margin: 5px 10px">
      <a-tabs tab-position="left" style="margin-top:10px" @change="callback">
        <a-tab-pane key="1">
          <span slot="tab">
            <a-icon type="android" />
            车辆列表
          </span>
         <!-- 车辆列表 -->
        <NewVehicles v-if="analisyType"></NewVehicles>      
        </a-tab-pane>
        <a-tab-pane key="2">
          <span slot="tab">
            <a-icon type="android" />
            仪表列表
          </span>
         <!-- 仪表列表 -->
        <NewInstruments v-if="analisyTypea"></NewInstruments>     
        </a-tab-pane>
        <a-tab-pane key="3">
          <span slot="tab">
            <a-icon type="android" />
            备件列表
          </span>
         <!-- 备件列表 -->
        <NewAccessories v-if="analisyTypeb"></NewAccessories>     
        </a-tab-pane>
        <a-tab-pane key="4">
          <span slot="tab">
            <a-icon type="android" />
            人员列表
          </span>
         <!-- 人员列表 -->
        <NewPersonnel v-if="analisyTypec"></NewPersonnel>     
        </a-tab-pane>
      </a-tabs> 
      </div>

    </a-card>
  </div>
</template>

<script>
import moment from 'moment'
import { getNowTime, getNowFormatDate } from '@/utils/util.js'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
import NewAccessories from '@/views/videoManage/resourceManagement/materialmanagement/newmanagement/addAccessoryList'
import NewInstruments from '@/views/videoManage/resourceManagement/materialmanagement/newmanagement/addInstrumentsList'
import NewPersonnel from '@/views/videoManage/resourceManagement/materialmanagement/newmanagement/addpersonList'
import NewVehicles from '@/views/videoManage/resourceManagement/materialmanagement/newmanagement/addVehiclesList'
export default {
  components: { NewAccessories, NewInstruments, NewPersonnel, NewVehicles },
  data() {
    return {
      analisyType: true,
      analisyTypea: false,
      analisyTypeb: false,
      analisyTypec: false,
    }
  },
  filters: {},
  created() {},
  computed: {},
  mounted() {},
  methods: {
  moment,
    //导航切换
    callback(key) {
      if (key == 1) {
        this.analisyType = true
        this.analisyTypea = false
        this.analisyTypeb = false
        this.analisyTypec = false
      } else if (key == 2 ) {
        this.analisyType = false
        this.analisyTypea = true
        this.analisyTypeb = false
        this.analisyTypec = false
      }else if (key == 3 ) {
        this.analisyType = false
        this.analisyTypea = false
        this.analisyTypeb = true
        this.analisyTypec = false
      }else if (key == 4 ) {
        this.analisyType = false
        this.analisyTypea = false
        this.analisyTypeb = false
        this.analisyTypec = true
      }
    },
  },
}
</script>
